<?php $this->pageTitle=Yii::app()->name; ?>

<h1>HDD Temp</h1>

<?php

$models = Hddtemp::model()->findall();
$temp = array();

$i = 0;
$len = 4;
$len0 = $len1 = $len2 = $len3 = 0;

foreach ($models as $model)
{
  $temp[] = array($i++, $model->temp);
}


$this->widget('application.extensions.EFlot.EFlotGraphWidget', 
	      array(
		    'data'=>array(
				  array(
					'label'=> '温度', 
					'data'=>$temp,
					'lines'=>array('show'=>true),
					),
				  ),
		    'options'=>array(
				     'legend'=>array(
						     'position'=>'nw',
						     'show'=>true,
						     'margin'=>10,
						     'backgroundOpacity'=> 0.5
						     ),
				     ),
		    'htmlOptions'=>array(
					 'style'=>'width:800px;height:200px;'
					 )
		    )
	      );
?>
